import Phaser from "phaser";
import { BootScene } from "./scenes/BootScene";
import { MenuScene } from "./scenes/MenuScene";
import { GameScene } from "./scenes/GameScene";


const originLayerWidth = 3200;
const originLayerHeight = 2400;

export const common_scale   = 0.3125;
export const rotation_delta = 0.065;

const config: Phaser.Types.Core.GameConfig = {
    title: 'Tank',
    version: '0.0.1',
    width: originLayerWidth*common_scale,
    height: originLayerHeight*common_scale,
    type: Phaser.AUTO,
    parent: 'game',
    scene: [BootScene, MenuScene, GameScene],
    input: {
        keyboard: true
    },

    physics: {
        default: 'arcade',
        arcade: {
            gravity: { y: 0, x: 0 },
            debug: false
        }
    }
    /* render: {
        antialias: true
    } */
};

window.addEventListener('load', () => new Phaser.Game(config))